<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"  xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content animated fadeInRight">
		<div class="row">
			<div class="col-sm-12">
				<div class="fixed-table-toolbar">
					<input type="hidden" id="mid" name="mid" th:value="${mid}">
				</div>
			</div>
			<div class="col-lg-12 col-md-12 col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-title">
						<div class="gg-nav">
							<ul class="nav nav-tabs">
								<li class="active" value="1">
									<a href="#unchecked" onclick="reLoadUnchecked()" data-toggle="tab">待审核</a>
								</li>
								<li value="2">
									<a href="#waitPay" onclick="loadWaitPay()" data-toggle="tab">待打款</a>
								</li>
								<li value="3">
									<a href="#wxPay" onclick="loadWxPay()" data-toggle="tab">微信已打款</a>
								</li>
								<li value="4">
									<a href="#offlinePay" onclick="loadOfflinePay()" data-toggle="tab">线下已打款</a>
								</li>
								<li value="5">
									<a href="#disabled" onclick="loadRefused()" data-toggle="tab">无效记录</a>
								</li>
							</ul>
						</div>
					</div>
					<div class="tab-content">
						<!--unchecked 未审核-->
						<div class="ibox-content tab-pane fade in active"  id="unchecked">
							<div class="fixed-table-toolbar">
								<div class="columns pull-left">
									<button type="button" class="btn  btn-danger" shiro:haspermission="finance:withdrawals:batchPass" onclick="batchCheck()">
										<i class="fa fa-check" aria-hidden="true"></i>批量审核
									</button>
								</div>
							</div>
							<table id="unCheckedTable" data-mobile-responsive="true"></table>
						</div>

						<!--waitPay 待打款-->
						<div class="ibox-content tab-pane fade in"  id="waitPay">
							<div class="fixed-table-toolbar">
								<div class="columns pull-left">
									<button type="button" class="btn btn-danger" shiro:haspermission="finance:withdrawals:batchWxPay" onclick="batchWxPay()">
										<i class="fa fa-list" aria-hidden="true"></i>批量微信打款
									</button>
									<button type="button" class="btn btn-warning" shiro:haspermission="finance:withdrawals:batchOfflinePay" onclick="batchOfflinePay()">
										<i class="fa fa-reorder" aria-hidden="true"></i>批量线下打款
									</button>
								</div>
							</div>
							<table id="waitPayTable" data-mobile-responsive="true"></table>
						</div>

						<!--wxPay 微信已打款-->
						<div class="ibox-content tab-pane fade in"  id="wxPay">
							<table id="wxPayTable" data-mobile-responsive="true"></table>
						</div>

						<!--offlinePay 线下已打款-->
						<div class="ibox-content tab-pane fade in"  id="offlinePay">
							<table id="offlinePayTable" data-mobile-responsive="true"></table>
						</div>

						<!--disabled 无效记录-->
						<div class="ibox-content tab-pane fade in"  id="disabled">
							<table id="disabledTable" data-mobile-responsive="true"></table>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

	<div>
		<script type="text/javascript">
			var s_checked_pass_h = 'hidden';
			var s_refuse_h = 'hidden';

			var s_wx_pay_h = 'hidden';
			var s_offline_pay_h = 'hidden';
		</script>
	</div>

	<div shiro:hasPermission="finance:withdrawals:pass">
		<script type="text/javascript">
			s_checked_pass_h = '';
		</script>
	</div>
	<div shiro:hasPermission="finance:withdrawals:refuse">
		<script type="text/javascript">
			s_refuse_h = '';
		</script>
	</div>

	<div shiro:hasPermission="finance:withdrawals:wxPay">
		<script type="text/javascript">
			s_wx_pay_h = '';
		</script>
	</div>
	<div shiro:hasPermission="finance:withdrawals:offlinePay">
		<script type="text/javascript">
			s_offline_pay_h = '';
		</script>
	</div>

	<div th:include="include :: footer"></div>
	<script type="text/javascript">
		function closeDow() {
			var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
			parent.layer.close(index);
		}
	</script>
	<script type="text/javascript" src="/js/appjs/finance/withdrawals/withdrawalsToMid.js"></script>
</body>
</html>
